import { getBannerAPI } from '@/apis/home'
import { reactive,onMounted  } from 'vue'
import { defineStore } from 'pinia'

export const useBannerStore = defineStore('banner',() => {
    const bannerList = reactive([])
    const getBanner = async () => {
        const {result} = await getBannerAPI()
            Object.assign(bannerList,result)
    }

    onMounted(() => {
        getBanner()
    })
    return {bannerList}
})